/*
 * @Author: 谢小康 2170673706@qq.com
 * @Date: 2024-01-28 19:39:35
 * @LastEditors: 谢小康 2170673706@qq.com
 * @LastEditTime: 2024-01-31 12:47:15
 * @FilePath: \My-bolg\server\router\comment.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const express = require('express');
const router = express.Router();
const {
    addcomment,
    getcomment,
    getcommentunm,
    replycomments,
    addstrs,
    getliuyan,
    getliuyannums,
    adddanmu,
    getdanmu
}=require("../controller/comments.js")
const {
    verifycommentpramas,
    verifycommentid
} =require('../middleware/comment.js')
const { auth } = require('../util/user');
const {isSuperAdmin} = require('../controller/user.js')
const {everfygetprams} = require('../middleware/friend.js')
/* 添加评论 */
router.post('/addcomment',verifycommentpramas,addcomment)
/* 获取评论 */
router.get("/getcomment",verifycommentid,getcomment)
/* 获取评论的数量 */
router.get("/getcommentunm",verifycommentid,getcommentunm)
/* 回复评论 */
router.post("/replycomments",verifycommentpramas,replycomments)
/* 评论点赞 */
router.post("/addstrs",addstrs)
/* 获取评论 */
router.get("/getliuyan",verifycommentid,everfygetprams,getliuyan)
/* 获取评论数量 */
router.get("/getliuyanunm",getliuyannums)   
router.post("/adddanmu",adddanmu)
router.get("/getdanmu",getdanmu)
module.exports = router